<!DOCTYPE html>
<html lang="en">
<head th:insert="/admin/common/head::css"></head>
<body>
<div th:insert="/admin/common/header::header" ></div>
<!--  main  -->
<div class="container-fluid">
  <div class="row-fluid">
    <div th:insert="/admin/common/side::side" ></div>
    <!-- content -->
    <div style="display: flex; flex-direction: column">
      <div class="span10" id="content">
        <div class="row-fluid">
          <!-- block -->
          <div class="block">
            <div class="navbar navbar-inner block-header" style="display: flex;flex-direction: row">
              <a class="btn btn-default" th:href="@{/admin/luntan/add.html}" role="button">新增</a>
            </div>
            <div class="block-content collapse in">
              <div class="span12">
                <table class="table">
                  <thead>
                  <tr>
                    <th>序号</th>
                    <th>帖子标题</th>
                    <th>帖子内容</th>
                    <th>帖子发布人</th>
                  </tr>
                  </thead>
                  <tbody>
                  <tr th:each = "luntan : ${luntans}">
                    <td th:text="${luntan.id}"></td>
                    <td th:text="${luntan.title}"></td>
                    <td th:text="${luntan.content}"></td>
                    <td th:text="${luntan.user.username}"></td>
                    <td>
                      <!--            //这样可以拿到对应数据-->
                      <a class="btn btn-default" th:href="@{/admin/luntan/detail(id = ${luntan.id})}" role="button">讨论</a>
                    </td>
                  </tr>
                  </tbody>
                </table>
              </div>
            </div>
          </div>
          <!-- /block -->
        </div>
      </div>
    </div>
    <!-- content -->
  </div>
</div>
<!--  main  -->
</body>
<div th:insert="/admin/common/footer::js" ></div>

</html>